<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" >
	<title>签名</title>
	<link rel="stylesheet" href="../vender/css/normalize.css">
	<link rel="stylesheet" href="sign_comments.css">
</head>
<body>
<header>
	<img src="return.png" onclick="history.back()" alt="返回">
	<p>个人签名</p>
	<span class="autograph">确定</span>
</header>
<section>
	<form>
		<textarea placeholder="请输入个人签名"  name="content" class="content"></textarea>
	</form>
</section>
<script src="../info/jquery.min.js"></script>
<script src="../vender/src/picturefill.js"></script>
<script src="../layer.js"></script>
<script type="text/javascript">
	$(".autograph").click(function(){
		var token = localStorage.phone;
		var content = $(".content").val();
		if(content==''){
			layer.msg("请输入你的个性签名");
			return false;
		}
		$.ajax({
			url:"https://newapp.icandrive.cn/api/autograph.php",
			type:'post',
			dataType:'json',
			data:{token:token,content:content},
			success:function(data){
				if(data.status==250){
					layer.msg(data.msg);
					setInterval(function(){
						window.location,href="../login/log_in.html";
					},2000);
				}
				if(data.status==200){
					layer.msg(data.msg);
					setInterval(function(){
						window.location.href="../coach-I/coach-me.html";
					},2000);
				}
				if(data.status==400){
					layer.msg(data.msg);
				}
			},
			error:function(){
				 layer.msg('系统维护中',function(){
                                history.go(0)
                            },1000);
			}
		});
	});
</script>

    <script>
    document.addEventListener("plusready", function() {
        // 注册返回按键事件
        plus.key.addEventListener('backbutton', function() {
            window.history.back();
        }, false);
        //此处false代表不退出页面，如果为true回退到上一个一面
    });
</script>
</body>
</html>
